#ifndef AXISSETTINGVIEW_H
#define AXISSETTINGVIEW_H

#include <QDialog>

#ifdef BUILD_X86_LINUX
#include "../CommunicateDelegate/gSoapFoundation/soapStub.h"
#endif
#ifdef BUILD_ARM
#include "../CommunicateDelegate/gSoapFoundation/soapStub.h"
#endif
#include "../CommunicateDelegate/globaldata.h"


class CommunicateNormalDelegate;

namespace Ui {
class AxisSettingView;
}

class AxisSettingView : public QDialog
{
    Q_OBJECT

public:
    explicit AxisSettingView(int styleId,CommunicateNormalDelegate *communicateNormalIn,QWidget *parent = 0);
    ~AxisSettingView();

    void initialDisplayStyle(int styleId);

public slots:
    void showView_slot();

private slots:
    void on_pushButton_changeConfig_clicked();

    void on_pushButton_getConfig_clicked();

    void on_comboBox_axisIndex_currentIndexChanged(int index);

    void on_pushButton_return_clicked();

    void on_comboBox_emmergencyDi_currentIndexChanged(int index);

    void on_comboBox_hmiServoOn_currentIndexChanged(int index);

    void on_comboBox_powerCheck_currentIndexChanged(int index);

    void on_comboBox_slowdown1_currentIndexChanged(int index);

    void on_comboBox_slowdown2_currentIndexChanged(int index);

    void on_comboBox_slowdown3_currentIndexChanged(int index);

    void on_comboBox_slowdown4_currentIndexChanged(int index);

    void on_comboBox_enablerun1_currentIndexChanged(int index);

    void on_comboBox_enablerun2_currentIndexChanged(int index);

    void on_comboBox_enablerun3_currentIndexChanged(int index);

    void on_comboBox_enablerun4_currentIndexChanged(int index);

    void on_comboBox_resetalarm_currentIndexChanged(int index);

    void on_comboBox_extServoon_currentIndexChanged(int index);

    void on_comboBox_rundi_currentIndexChanged(int index);

    void on_comboBox_ceasedi_currentIndexChanged(int index);

    void on_comboBox_stopdi_currentIndexChanged(int index);

    void on_comboBox_autoServoon_currentIndexChanged(int index);

    void on_comboBox_runcheck1_currentIndexChanged(int index);

    void on_comboBox_runcheck2_currentIndexChanged(int index);

    void on_comboBox_runcheck3_currentIndexChanged(int index);

    void on_comboBox_runcheck4_currentIndexChanged(int index);

    void on_comboBox_ultrasonic_currentIndexChanged(int index);

    void on_comboBox_enablerunautomode_currentIndexChanged(int index);

    void on_comboBox_errormusic_currentIndexChanged(int index);

    void on_comboBox_barriermusic_currentIndexChanged(int index);

    void on_pushButton_getSafeConfig_clicked();

    void on_pushButton_getRobotCoordinateParameter_clicked();

    void on_pushButton_setRobotCoordinateParameter_clicked();

private:
        bool isAuthorityOk();
        void showConfigInfo(AxisProperty_hmi axisPropertyIn);
        void changeSafetyCheck(E_SAFETY_CHECK typeIn, int isEnable);
        void updateShowSafetyCheck();
        void updateCoordinateConfig();

private:
    Ui::AxisSettingView *ui;
    CommunicateNormalDelegate *communicateNormal;
    bool isInitialOk;

};

#endif // AXISSETTINGVIEW_H
